package com.qian.service.ddj.entity;

import com.yaowk.service.common.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;


import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 代付订单列表
 */
@ToString
@Getter
@Setter
@DynamicInsert
@DynamicUpdate
@Entity
public class DdjDaiFuOrder extends BaseEntity<Long> {

    private String person;
    private String cardNo;
    private String bank;
    private String phone;
    private BigDecimal realAmount;
    private BigDecimal amount;
    private String orderNo;
    private String outOrderNo;
    private String upOrderNo;
    @CreationTimestamp
    private Date createDate;
    private Date finishDate;
    private Byte status;
    private String backup1;//支行名称
    private String backup2;//开户省
    private String backup3;//开户市
    private String backup4;//notifyUrl
    private String backup5;
    @Column(insertable = false,updatable = false)
    private Integer userId;
    @Column(insertable = false,updatable = false)
    private Integer dfBusinessId;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "userId")
    private DdjUser ddjUser;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "dfBusinessId")
    private DdjDfBusiness ddjBusiness;
}
